<template>
    <div>
        <Header></Header>
        <van-card
            v-for="item in kPriceShopList"
            :key="item.id"
            :price="item.originalPrice"
            :desc="item.characteristic"
            :title="item.name"
            :thumb="item.pic"
            @click="gotoDetail(item.id)"
        />
    </div>
</template>

<script>
import Header from '@/components/Header/Header'
export default {
    components:{
        Header,
    },
    data() {
        return {
            kPriceShopList: [],
        };
    },
    methods: {
        gotoDetail(id){
            // console.log(id);
            this.$router.push({path:'/shopDetail',query:{id:id}})
        }
    },
    mounted() {
        this.$API.getKPriceShop().then((res) => {
            // console.log(res.data.data.goodsMap);
            this.kPriceShopList=res.data.data.goodsMap
        });
    },
};
</script>